"""
URL configuration for Django_learn project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/5.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.contrib import admin
# from django.http import HttpResponse
from django.shortcuts import HttpResponse
from django.urls import path,include
from book import views
from django.urls import reverse
from django.shortcuts import render
from django.conf import settings
from django.conf.urls.static import static

from django.contrib import admin
from django.urls import path, include
from django.contrib.auth import views as auth_views


def index(request):

    return HttpResponse("Hello, Django!")

def found(request):
    print(reverse("book1"))
    return HttpResponse("Hello, Django!")

def trans(request):
    return render(request,"xyy_copy.html")

urlpatterns = [
    path('chat/', include('chat.urls')),
    path('register/', auth_views.LoginView.as_view(template_name='chat/register.html'), name='register'),
    path('login/', auth_views.LoginView.as_view(template_name='chat/login.html'), name='login'),
    path('logout/', auth_views.LogoutView.as_view(), name='logout'),

    path("admin/", admin.site.urls),
    path("",index),
    # path("book1",found,name="book1"),
    # path("book/uuid/<uuid:book_uuid>",views.book_detail_uuid,name="111"),
    # path("book/path/<path:book_path>/",views.book_detail_path,name="book_detail_path"),
    # path("book/slug/slug:book_slug",views.book_detail_slug,name="book_detail_slug"),
    # path("book/str/<str:book_title>",views.book_detail_str,name="book_detail_str"),
    # path("book/int/<int:book_id>",views.book_detail_int),
    # path("book",views.book_detail_query_string),

    path("movie/",include("movie.urls")),

    path("trans/",trans),
    path("book/",include("book.urls")),

    path("people/",include("people.urls")),
    path("bootstrapapp/",include("bootstrapApp.urls")),
    path("tt_auth/", include("tt_auth.urls")),
    path('messages/', include('messaging.urls')),
]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)








